<template>
	<view class="content">
		<image class="logo" src="/static/aile.png"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
		<view class="text-company">
			<text class="company">{{company}}</text>
		</view>
	</view>
</template>

<script lang="ts">
	let timer: ReturnType < typeof setTimeout > | null = null;
	export default {
		data() {
			return {
				title: '艾乐工坊',
				company: 'XXX科技有限公司'
			}
		},
		onLoad() {

		},
		onReady() {
			this.onSetTimeout();
		},
		beforeUnmount() { // clearTime
			this.clearTimer();
		},
		methods: {
			onSetTimeout() {
				timer = setTimeout(() => {
					uni.switchTab({
						url: "/pages/tap0/tap0"
					});
				}, 3000);
			},
			clearTimer() { // clearTime
				if (timer) {
					clearTimeout(timer);
					timer = null;
				}
			}
		}
	};
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
		border-radius: 15rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}

	.text-company {
		position: absolute;
		bottom: 80rpx;
		font-size: 24rpx;
		color: #8f8f94;
	}
</style>